var count = 0;
var $img = null;

$(function() {	
	init();	
	start();
});

function init() {	
	$img = $("#img");
}

function start() {
	setInterval(changeImage, 900);
}

function changeImage() {
	count++;	
	if (count > 10)	count = 1;

	$img.attr("src", "images/img" + count + ".jpg");
}